# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=d-feet
pkgver=0.3.16
_v=${pkgver%.*}
pkgrel=1
pkgdesc="powerful D-Bus Debugger"
options="!check" # Testsuite loops infinitely
url="https://wiki.gnome.org/action/show/Apps/DFeet"
arch="noarch"
license="GPL-2.0-or-later"
depends="python3 py3-gobject3 gtk+3.0"
makedepends="
	meson
	itstool
	glib-dev
	gtk+3.0-dev
	gobject-introspection-dev
	"
source="https://download.gnome.org/sources/d-feet/$_v/d-feet-$pkgver.tar.xz
	meson-0.60.patch
	"

build() {
	abuild-meson \
		-Dtests=false \
		output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output

	# Fix on musl
	sed -i 's|locale.textdomain("d-feet")||' "$pkgdir"/usr/bin/d-feet
}

sha512sums="
ff4db968cbd679e2065c614d538187fe3c56118b44638771ec9f7472bdba4a798dc682565f520a8680a8001ea39ce88555b07cda172e60f88eb6bdf1e00b5a6d  d-feet-0.3.16.tar.xz
536da02d8b8742818e81ab9e82b06b75a5ec55ad056793aeb3ca2c8f358a22040afb91c2217953ef1807b5ddaef2bdccab82edb89740e5d325b4a862ed80bc78  meson-0.60.patch
"
